package com.twu.biblioteca.io;

import java.io.BufferedReader;
import java.io.IOException;

/**
 * Created by cristianpinto on 2/19/14.
 */
public class UserIOParser {

    private BufferedReader bufferedReader;

    public UserIOParser(BufferedReader bufferedReader) {
        this.bufferedReader = bufferedReader;
    }

    public String readUserInput() {

        String userInput = "";
        try {
            userInput = bufferedReader.readLine();
        } catch (IOException exception) {
            printLine(exception.getCause() + "");
        }
        return userInput;
    }

    public void printLine(Object arg) {
        System.out.println(arg);
    }
}
